<template>
	<view>
		<view class="card">
			<view class="text-center u-font-32">今日收款{{billInfo.counts}}笔，共计</view>
			<view class="text-center u-m-t-32" @tap="$u.route('/subpkg/bill/collection/collectionDetails?billId=')">
				<text class="unit">￥</text>
				<text class="amount">{{parseFloat(billInfo.money?billInfo.money:0).toFixed(2)}}</text>
			</view>
			<view @tap="$u.route('/subpkg/bill/collection/collection')" class="flex u-row-center u-m-t-80">
				<view class="u-font-26" style="color: #999;">查看入账</view>
				<u-icon name="arrow-right" size="12" color="#999"></u-icon>
			</view>
		</view>

		<!-- <view @tap="$u.route('/subpkg/bill/report/report')" class="card flex u-row-between ">
			<view>经营报表</view>
			<u-icon name="arrow-right" size="14" color="#999"></u-icon>
		</view> -->
		
		<!-- <view @tap="" class="card flex u-row-between ">
			<view>京东取件</view>
			<u-icon name="arrow-right" size="14" color="#999"></u-icon>
		</view>
		
		 -->

		<!-- <u-tabbar :value="tab" :fixed="true" :placeholder="true" activeColor="#81D8CF" :safeAreaInsetBottom="true">
			<u-tabbar-item text="订单" icon="home" @tap="toRoute('/subpkg/order/order')" name="order"></u-tabbar-item>
			<u-tabbar-item text="账单" icon="list" name="bill"></u-tabbar-item>
			<u-tabbar-item text="商品" icon="bag" @tap="toRoute('/subpkg/goods/goods')" name="product"></u-tabbar-item>
		</u-tabbar> -->
	</view>
</template>

<script>
	import {getShopDay,yizhanJDKY} from '@/common/api/api.js'
	export default {
		data() {
			return {
				tab: 'bill',
				billInfo:{counts:0,money:0},
				companyId:'',
			}
		},
		onShow() {
			this.companyId = this.$store.state.$userInfo.companyId;
			this.handleFindDay();
		}
		,
		methods: {
			toRoute(url) {
				uni.redirectTo({
					url: url
				})
			},
			handleFindDay(){
				getShopDay({companyId:this.companyId}).then(res=>{
					if(res.code==200)
					this.billInfo=res.data;
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.card {
		margin: 32rpx;
		border-radius: 16rpx;
		background-color: #fff;
		padding: 32rpx 32rpx;

		.unit {
			font-size: 40rpx;
			color: #81D8CF;
			font-weight: 800;
		}

		.amount {
			font-size: 60rpx;
			font-weight: 800;
			color: #81D8CF;
			margin-left: 10rpx;
		}
	}
</style>